#ifndef SEQIOT_SQL_DML_H
#define SEQIOT_SQL_DML_H

#include "param.h"
#include "cgi_helper.h"

char *param_to_sql_select(const query_param_t *param, char *sql, size_t size);

char *param_to_sql_option(const query_param_t *param, char *sql, size_t size);

char *param_to_sql_option_acquire(const query_param_t *param, char *sql, size_t size);

char *param_to_sql_option_channel(const query_param_t *param, char *sql, size_t size);

char *param_to_sql_option_type(const query_param_t *param, char *sql, size_t size);

char *param_to_sql_insert(const query_param_t *param, char *sql, size_t size);

char *param_to_sql_update(const query_param_t *param, char *sql, size_t size);

char *param_to_sql_allactive(const query_param_t *param, char *sql, size_t size);

char *param_to_sql_update_option(const query_param_t *param, char *sql, size_t size);

char *param_to_sql_delete(const query_param_t *param, char *sql, size_t size);

int param_to_sql_get(const query_param_t *param, char *sql, size_t size);

int param_to_sql_post(const query_param_t *param, char *sql, size_t size);

void *sql_execute_csv(sqlite3 *db, const char *sql);

cJSON *sql_execute(sqlite3 *db, const char *sql);

cJSON *sql_post_execute(sqlite3 *db, const char *sql);

cJSON *acquire_info_func(seqiot_t *seqiot);

#endif //SEQIOT_SQL_DML_H
